#pragma once

#include <assert.h>
#include "../Core/Mesh.h"

#include "BufferHint.h"
#include "ComponentDatatype.h"
#include "ShaderVertexAttribute.h"
#include "Uniform.h"
#include "BufferEnumGL3x.h"
#include "TextureFilter.h"
#include "TextureWrap.h"
#include "TextureFormat.h"
#include "ImageFormat.h"
#include "ImageDatatype.h"
#include "IndexBuffer.h"
#include "Blending.h"
#include "ColorMask.h"
#include "DepthRange.h"
#include "DepthTest.h"
#include "FacetCulling.h"
#include "PrimitiveRestart.h"
#include "ScissorTest.h"
#include "StencilTest.h"
#include "RenderState.h"
#include "ClearState.h"


using namespace Core;

namespace Renderer
{
	namespace GL3x
	{
		class TypeConverterGL3x
		{
		public:

			static BufferHint To(const BufferUsageHint& hint);
		
			static BufferUsageHint To(const BufferHint& hint);

			static GLenum to_gl_type(const IndexBufferDatatype& type);

			static GLenum to_gl_type(const ComponentDatatype& type);

			static GLenum to_gl_type(const PrimitiveType& type);

			static GLenum to_gl_type(const BufferTarget& type);

			static GLenum to_gl_type(const BufferHint& type);

			static GLenum to_gl_type(const TextureMinificationFilter& type);

			static GLenum to_gl_type(const TextureMagnificationFilter& type);

			static GLenum to_gl_type(const TextureWrap& type);
			
			//Stream,Static,Dynamic
			static GLenum to_gl_type(const PixelBufferHint& hint, const PixelBufferHintType& type);
	
			static GLenum to_gl_type(const TextureFormat& format);

			static GLenum to_gl_type(const ImageFormat& format);

			static GLenum to_gl_type(const ImageDatatype& datatype);

			static GLenum to_gl_type(const CullFace& face);

			static GLenum to_gl_type(const WindingOrder& order);

			static GLenum to_gl_type(const RasterizationMode& mode);

			static GLenum to_gl_type(const StencilOperation& operation);

			static GLenum to_gl_type(const StencilTestFunction& function);

			static GLenum to_gl_type(const DepthTestFunction& function);

			static GLenum to_gl_type(const SourceBlendingFactor& factor);

			static GLenum to_gl_type(const DestinationBlendingFactor& factor);

			static GLenum to_gl_type(const BlendEquation& equation);

			static GLenum to_gl_type(const ClearBuffers& mask);

			static GLenum TextureToPixelFormat(const TextureFormat& format);

			static GLenum TextureToPixelType(const TextureFormat& format);

			static ShaderVertexAttributeType TO_ShaderVertexAttributeType(GLenum& type);

			static UniformType TO_UniformType(GLenum& type);


		};
	}
}